// 抽离路由模块文件
// 导入路由组件
import VueRouter from "vue-router";

// 导入对应的路由组件
import HomeContainer from "./components/content/HomeContainer.vue";
import MemberContainer from "./components/content/MemberContainer.vue";
import ShopcarContainer from "./components/content/ShopcarContainer.vue";
import SearchContainer from "./components/content/SearchContainer.vue";
import NewsList from "./components/news/NewsList.vue";
import NewInfo from "./components/news/NewInfo.vue";
import PhotoList from "./components/photo/PhotoList.vue";
import PhotoDetail from "./components/photo/PhotoDetail.vue";
import ImgContent from "./components/photo/ImgContent.vue"
import CommodityList from "./components/commodity/CommodityList.vue";
import CommodityInfo from "./components/commodity/CommodityInfo.vue";


export default new VueRouter({
    routes: [
        { path: '/', redirect: '/home' },
        { path: '/home', component: HomeContainer },
        { path: '/member', component: MemberContainer },
        { path: '/shopcar', component: ShopcarContainer },
        { path: '/search', component: SearchContainer },
        { path: '/home/newsList', component: NewsList },
        { path: '/home/newInfo/:id', component: NewInfo },
        { path: '/home/photolist', component: PhotoList },
        { path: '/photolist/imgContent/:id', component: ImgContent },
        { path: '/home/photoDetail/:id', component: PhotoDetail },
        { path: '/home/commoditylist', component: CommodityList },
        { path: '/home/commodityinfo/:id', component: CommodityInfo }
    ],
    linkActiveClass: 'mui-active' // 在当前 <router-link> 的 class 后面追加 mui-active
    // 原本 <router-link class="mui-tab-item" to="/member"> 追加后 <router-link class="mui-tab-item router-link-exact-active mui-active " to="/member">
    // router-link-exact-active 是默认生成的
});
